package jsr166.contrib.uncontended;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReadWriteLock;

/**
 * This lock class does nothing; no checking or locking of any kind.
 * It is provided so that you write code to use a lock that
 * is selected to be either a NoOpUncontendedReadWriteLock (which will have no
 * performance penalty) or a UncontendedReadWriteLock (which has some performance
 * penalty but checks for unexpected lock contention).
 */
public class NoOpUncontendedReadWriteLock implements ReadWriteLock {

    public Lock readLock() {
        return new NoOpUncontendedLock();
    }

    public Lock writeLock() {
        return new NoOpUncontendedLock();
    }

}
